Resource URL: /platform/<<version=1>>/snapshot/snapshots/<SID>/locks

    Overview: This resource applies the standard collection pattern to the
              locks on a OneFS snapshots.

     Methods: GET, POST, DELETE

********************************************************************************

Method GET: List all locks.

       URL: GET /platform/<<version=1>>/snapshot/snapshots/<SID>/locks

Query arguments:
  sort=<string> The field that will be used for sorting.  Choices are id,
                expires, and comment.  Default is id.
limit=<integer> Return no more than this many results at once (see resume).
     dir=<enum> Where <enum> is one of ASC, DESC.  The direction of the sort.
resume=<string> Continue returning results from previous call using this token
                (token should come from the previous call, resume cannot be
                used with other options).

GET response body schema:
{
  "type": "object", 
  "properties": {
    "locks": {
      "items": {
        "type": "object", 
        "properties": {
          "comment": {
            "type": "string", 
            "description": "User supplied lock comment."
          }, 
          "count": {
            "type": "integer", 
            "description": "Recursive lock count."
          }, 
          "expires": {
            "type": [
              "integer", 
              "null"
            ], 
            "description": "The Unix Epoch time the snapshot lock will expire and be eligible for automatic deletion."
          }, 
          "id": {
            "type": "integer", 
            "description": "System generated lock ID."
          }
        }
      }, 
      "type": "array"
    }, 
    "total": {
      "type": "integer", 
      "description": "Total number of items available."
    }, 
    "resume": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Resume token value to use in subsequent calls for continuation."
    }
  }
}

********************************************************************************

Method POST: Create a new lock on this snapshot.

        URL: POST /platform/<<version=1>>/snapshot/snapshots/<SID>/locks

There are no query arguments for this method.

POST request body schema:
{
  "type": "object", 
  "properties": {
    "comment": {
      "required": false, 
      "type": "string", 
      "description": "Free form comment."
    }, 
    "expires": {
      "required": false, 
      "minimum": 1, 
      "type": [
        "null", 
        "integer"
      ], 
      "description": "The Unix Epoch time the snapshot lock will expire and be eligible for automatic deletion.", 
      "maximum": 2147483647
    }
  }
}

POST response body schema:
{
  "type": "object", 
  "properties": {
    "id": {
      "required": true, 
      "type": "integer", 
      "description": "The ID of the newly created snapshot lock."
    }
  }
}

********************************************************************************

Method DELETE: Delete all locks. Will try to drain count of recursively held
               locks so that the snapshot can be deleted.

          URL: DELETE /platform/<<version=1>>/snapshot/snapshots/<SID>/locks

There are no query arguments for this method.

There is no response body for this method.
